import request from "../utils/request";

const api = {
  getUserList: "/users",
  createUser: "/users",
  getUserDetail: (id) => `/users/${id}`,
};

export const getUserList = (params = {}) => {
  return request({ url: api.getUserList, method: "get", params });
};

export const createUser = (data) => {
  return request({ url: api.createUser, method: "post", data });
};

export const getUserDetail = (id) => {
  return request({ url: api.getUserDetail(id), method: "get" });
};
